package com.whnk.web.controller.report;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.whnk.framework.web.base.BaseController;
import com.whnk.report.domain.EChartsData;
import com.whnk.report.service.ICompEmpService;

/**
 * CompPdController
 * 
 * @author whwhnk
 * @date 2019-02-27
 */
@Controller
@RequestMapping("/report/compEmp")
public class CompEmpController extends BaseController
{
    private String prefix = "report/compEmp";
	
	@Autowired
	private ICompEmpService compEmpService;
	
	@RequiresPermissions("report:compEmp:view")
	@GetMapping()
	public String compPd()
	{
	    return prefix + "/compEmp";
	}
	
	/**
	 * 查询报统计数据
	 */
	@PostMapping("/queryResult")
	@ResponseBody
	public EChartsData queryResult()
	{
		return compEmpService.selectCompEmpRpt();
	}
	
}
